package com.neuedu.mapper;

import com.neuedu.po.Pay;
import com.neuedu.po.User;
import org.apache.ibatis.annotations.*;

import java.util.List;

@Mapper
public interface PayMapper {
    //根据 uname 和  usage
//    public List<Pay> selectAllpay(Pay p);
//    @Select("select * from fa_pay where id=#{id}")
//    public Pay selectPayById(Pay p);
//    @Insert("insert into fa_pay(uname,money,type,payer,payDate,usage,remark) values (#{uname},#{money},#{type},#{pay},#{payDate},#{usage},#{remark})")
//    public int add(Pay p);
//    @Update("update fa_pay set uname=#{uname},money=#{money},type=#{type},payer=#{payer},payDate=#{payDate},usage=#{usage},remark=#{remark} where id=#{id}")
//    public int update(Pay p);
//    @Delete("delete from fa_pay where id=#{id}")
//    public int delete(Pay p);

    //根据uname 和 homecall做模糊匹配，在映射文件里面写sql语句
    public List<Pay> selectAllpay(Pay p);

    @Select ("select * from fa_pay where id=#{id}")
    public Pay selectById(Pay p);
    @Insert("insert into fa_pay(uname,money,type,payer,payDate,usering,remark) values (#{uname},#{money},#{type},#{payer},#{payDate},#{usering},#{remark})")
    public int add(Pay p);
    @Update("update fa_pay set uname=#{uname},money=#{money},type=#{type},payer=#{payer},payDate=#{payDate},usering=#{usering},remark=#{remark} where id=#{id}")
    public int update(Pay p);
    @Delete("delete from fa_pay where id=#{id}")
    public int delete(Pay p);

}
